package com.sky.mapper;

import com.sky.aop.AutoFill;
import com.sky.entity.Category;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CategoryMapper {
    List<Category> selectAll(String name, Integer type);

    @AutoFill(OperationType.UPDATE)
    Integer update(Category category);

    @AutoFill(OperationType.INSERT)
    Integer insert(Category category);

    Integer delete(Long id);

    List<Category> selectByType(Integer type);
}